
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>${(user.name)!""}的主页 - 熊猫知识库</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="keywords" content="${(user.name)!""}的主页,甜甜圈,知识库,问答系统">
	<meta name="description" content="${(user.name)!""}的主页,甜甜圈,知识库,问答系统">
	<#include "/common/header.html">
	
	<div class="main fly-user-main layui-clear">
	<#assign menu="index">
	<#include "/user/left.html">
	
	<div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title" id="LAY_mine">
        <li data-type="mine-jie" lay-id="index" class="layui-this">我的主题（<span>${(topicPpt.count)!0}</span>）</li>
        <li data-type="collection" data-url="/collection/find/" lay-id="collection">我的回复（<span>${(repliePpt.count)!0}</span>）</li>
      </ul>
      <div class="layui-tab-content" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <#if topics?if_exists && topics?size gt 0>
          <ul class="mine-view jie-row" id="topicsData">
      		<#list topics as item>
            <li>
            	<a href="/topic/detail/${(item.id)!0}.html" target="_blank">${(item.title)!""}</a>
              	<i>${(item.updateTime)?string('yyyy-MM-dd hh:mm')}</i>
              	<a class="mine-edit" href="/topic/edit/${(item.id)!0}.html">编辑</a>
              	<em>${(item.numberRead)!0}阅/${(item.numberReply)!0}答</em>
            </li>
            </#list>
          </ul>
          <div id="page_topic"></div>
          <#else>
	      <div style="text-align: center">
	        <div class="laypage-main">您还没有发布过主题哦！</div>
	      </div>
          </#if>
        </div>
        <div class="layui-tab-item layui-inline" >
		    <div class="fly-panel">
		      	<#if replies?if_exists && replies?size gt 0>
		      	<ul class="home-jieda mine-view jie-row" id="replyData">
		      	<#list replies as item>
		      		<li>
		          		<p>
		          			<span>${(item.updateTime)?string('yyyy-MM-dd hh:mm')}</span>
		          			在<a href="/topic/detail/${(item.topicId)!0}.html" target="_blank">${(item.topicTitle)!""}</a>中回复：
		          		</p>
		          		<div class="home-dacontent" style="display:block;">${(item.content)!""}</div>
		        	</li>
		        </#list>
      			</ul>
      			<#else>
		      <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>还没有任何回复！</span></div>
		      </#if>
  		</div>
  
      </div>
    </div>
  </div>
  </div>
  <script id="topicTmpl" type="text/html">
{{#  layui.each(d.list, function(index, item){ }}
	<li>
		<a href="/topic/detail/{{item.id}}.html" target="_blank">{{ item.title }} </a>
              	<i>{{ item.updateTime }}</i>
              	<a class="mine-edit" href="/topic/edit/{{item.id}}.html">编辑</a>
              	<em>{{ item.numberRead }} 阅/{{ item.numberReply }} 答</em>
            </li>
{{#  }); }}
</script>
  
  <script type="text/javascript">
  	var pageTopic = ${((topicPpt.count)!0 / (topicPpt.size)!1)?ceiling};
  	var pageReply = ${((repliePpt.count)!0 / (repliePpt.size)!1)?ceiling};
  	
  	var startTopic = ${(topicPpt.start)!0};
  	var startReply = ${(topicPpt.start)!0};
  </script>

<#assign jsFilename="user">
<#include "/common/footer.html">

</body>
</html>